package com.xinghou.platform.dao.main;

import com.xinghou.platform.model.main.SharedCardPraise;
import org.springframework.dao.DataAccessException;

import java.sql.Timestamp;
import java.util.List;

public interface SharedCardPraiseDAO {
	public List<SharedCardPraise> getSharedCardPraise(int num, int cardid);

	public SharedCardPraise getSharedCardPraiseByid(Integer Id)
			throws DataAccessException;

	public int updateSharedCardPraise(SharedCardPraise sharedCardPraise)
			throws DataAccessException;

	public int saveSharedCardPraise(SharedCardPraise sharedCardPraise)
			throws DataAccessException;

	public SharedCardPraise getSharedCardPraiseBytwo(Integer userId,
			Integer cardId) throws DataAccessException;

	public List<SharedCardPraise> getSharedCardPraiselist();
	
	/**
	 * 点赞列表
	 * @param cardid	分享卡id
	 * @param id		最小id
	 * @param rowNum	行数s
	 * @return
	 */
	public List<SharedCardPraise> getShareCardPreiseListByCardid(int cardid,int id,int rowNum);
	
	/**
	 * 查询用户是否点赞
	 * @param id		分享卡ID
	 * @param userId	查询用户
	 * @return
	 * @throws DataAccessException
	 */
	public SharedCardPraise getSharedCardPraiseStatusByid(int id,int userId) throws DataAccessException;

	/**
	 * 查询用户已点赞列表
	 * @param userId
	 * @param time
	 * @param limit
	 * @return
	 * @throws DataAccessException
	 */
	public List<SharedCardPraise> getSharedCardByUserId(int userId,Timestamp time,int limit) throws DataAccessException;
}
